<template>
    <div class="banner">
        <bannerList :list="list" @editBanner="getBanner"/>
    </div>
</template>

<script>
import { getBanner } from '@/api/banner';
import bannerList from '@/components/banner/bannerList.vue';
export default {
    components : {
        bannerList
    },
    data() {
        return {
            list : [],
        }
    },
    created(){
        this.getBanner()
    },
    methods : {
        getBanner(){
            getBanner().then(res => {
                if (res.code == 200) {
                    this.list = res.data
                }
            })
        },
    }
}
</script>

<style lang="less" scoped>
</style>